﻿using System;
using Microsoft.Win32;
/*
 Code Paragraph
 */
namespace ConsoleTest
{
    
    public class RegistryClass
    {
        private static string[] StrArr = new string[4] {"HKEY_LOCAL_MACHINE","SOFTWARE","Microsoft",".NETFramework" };

        public static void RegistryKeyFun()
        {
            Microsoft.Win32.RegistryKey rKey = Microsoft.Win32.Registry.LocalMachine;
            string sSubKey = "DbgManagedDebugger";

            string sKey=StrArr[0];

            for (int i = 0; i < StrArr.Length; i++)
            {
                sKey+="/"+StrArr[i];
                rKey=rKey.OpenSubKey(StrArr[i]);
            }

            System.Console.WriteLine("Key Value {0}/{1}", sKey, sSubKey);
            System.Console.WriteLine(rKey.GetValue(sSubKey));
        }
    }
}